<?php

exit;
ulimit();
define("ROOT_PATH",  dirname(__FILE__));
define("APP_PATH",  ROOT_PATH.'/application');

require_once('./dzf/dzf_core.php');
DZF::creatapp('./config/config_global.php', 'mapi')->run();

function ulimit($limit = 300){
        $access = (string)(time());
        $complicating = apc_inc($access);
        if($complicating > $limit) {
                $_key = 'ulimit';
                if(apc_inc($_key) === false) {
                        apc_add($_key, 1);
                }
				header('HTTP/1.1 503 Too busy, try again later');
                exit;
        } elseif ($complicating === false) {
                apc_add($access, 1, 2);
        }
}